package com.boot.repository;

import com.boot.entity.SelectCourse;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import javax.persistence.criteria.CriteriaBuilder;
import javax.transaction.Transactional;
import java.util.List;

@Transactional
@Repository
public interface SelectCourseRepository extends JpaRepository<SelectCourse, Integer>, JpaSpecificationExecutor<SelectCourse> {
    List<SelectCourse>findSelectCourseByCourseid(Integer id);
    List<SelectCourse>findSelectCourseByStunum(String s);
    void deleteAllByCourseid(Integer id);
    void deleteSelectCoursesByCourseidAndStunum(Integer courseid,String stunum);
    Boolean existsByStunumAndCourseid(String stunum,Integer cid);
}
